﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataCatalog.aspx.cs" Inherits="Ogdi.InteractiveSdk.WebForms.Forms.DataCatalogForm"
    MasterPageFile="~/InteractiveSdk.Master" %>

<asp:Content ID="content" ContentPlaceHolderID="contentPlaceholder" runat="server">
    <asp:ScriptManagerProxy ID="scriptManagerProxy" runat="server">
        <Scripts>
            <asp:ScriptReference Path="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" />
            <asp:ScriptReference Path="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" />
            <asp:ScriptReference Path="~/DataCatalog.aspx.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <h1>
        Data Catalog</h1>
    <div>
        <asp:Panel ID="TitlePanel" runat="server" CssClass="collapsePanelHeader" ToolTip="Click for more details..."
            EnableViewState="False">
            <p class="big">
                Data in the Open Government Data Initiative is organized into containers, each of
                which represents data from a specific jurisdiction or organization. Within a data
                set, containers are organized into categories.<%-- Section 508 - Added alternate and descriptive text for image and changed asp:image to asp:imagebutton to set focus on control--%><asp:ImageButton
                    ID="Image1" runat="server" ImageUrl="~/images/expand.jpg" AlternateText="Control which gives more details"
                    DescriptionUrl="~/desc/Expand.txt" OnClientClick="return false;" />
            </p>
        </asp:Panel>
        <asp:Panel ID="ContentPanel" runat="server" CssClass="collapsePanel" EnableViewState="False">
            <p class="big" style="margin: 0px; padding-top: 0px;">
                To discover data sets, first select a container. The grid will show all of the data
                sets in that container. If you would like to only show data sets in a particular
                category, click one of the categories along the left side of this page.
                <br />
                To query data within a data set, click the name of the data set in the grid. The
                grid also shows the source of the data set and a brief description. To view extended
                information about a particular data set (if available), click the "More Information"
                link under the data set's description.
            </p>
        </asp:Panel>
        <ajaxToolkit:CollapsiblePanelExtender ID="cpe" runat="Server" TargetControlID="ContentPanel"
            ExpandControlID="TitlePanel" CollapseControlID="TitlePanel" CollapsedSize="0"
            ExpandedSize="140" Collapsed="True" AutoCollapse="False" AutoExpand="False" ScrollContents="False"
            TextLabelID="Label1" CollapsedText="Show Details" ExpandedText="Hide Details"
            ImageControlID="Image1" ExpandedImage="~/images/collapse.jpg" CollapsedImage="~/images/expand.jpg"
            ExpandDirection="Vertical" EnableViewState="False" />
        <p class="big" style="margin: 0px; padding-top: 0px;">
            Select Container:
            <asp:DropDownList ID="containerDropdown" runat="server" EnableViewState="True" AutoPostBack="True"
                OnSelectedIndexChanged="containerDropdown_SelectedIndexChanged">
            </asp:DropDownList>
            &nbsp;
            <asp:UpdatePanel ID="legalDisclaimerLinkUpdatePanel" runat="server" EnableViewState="false">
                <ContentTemplate>
                    <div class="legallink">
                        <a id="legalDisclaimerLink" href="#" runat="server" onclick="legalDisclaimerLinkClicked()">
                            LEGAL DISCLAIMER</a>
                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="containerDropdown" EventName="SelectedIndexChanged" />
                </Triggers>
            </asp:UpdatePanel>
            <div style="height: 8px;">
                &nbsp;</div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <table>
                <tr>
                    <td valign="top">
                        <div class="leftmenu">
                            <asp:LinkButton ID="allCategoriesButton" runat="server" Text="All" CssClass="linkActive"
                                OnClick="allCategoriesButton_Click" EnableViewState="False" />
                            <asp:DataList ID="categoriesList" runat="server">
                                <ItemTemplate>
                                    <asp:LinkButton ID="categoryLink" Text="<%# Container.DataItem %>" runat="server"
                                        OnClick="categoryButton_Click">
                                    </asp:LinkButton>
                                </ItemTemplate>
                            </asp:DataList>
                        </div>
                    </td>
                    <td valign="top">
                        <h3>
                            <asp:Label ID="categoryLabel" runat="server" EnableViewState="False" />
                        </h3>
                        <asp:Panel ID="errorPanel" Visible="false" runat="server" EnableViewState="False">
                            <asp:Label ID="errorLabel" runat="server" ForeColor="Red" EnableViewState="False" />
                            <br />
                            <asp:Label ID="errorDetailsLabel" runat="server" EnableViewState="False" />
                        </asp:Panel>
                        <div class="datascroll">
                            <asp:XmlDataSource ID="xmlDataSource" XPath="Root/properties" runat="server" EnableCaching="false"
                                EnableViewState="False"></asp:XmlDataSource>
                            <%-- Section 508 - Added table to show all available entity sets--%>
                            <asp:Table ID="tblDataCatalog" runat="server" CssClass="PrettyGridView-Table">
                                <asp:TableHeaderRow ID="TableHeaderRow1" Height="18px" runat="server" CssClass="AspNet-GridView-Header">
                                    <asp:TableHeaderCell ID="hdrName" Text="Name" ForeColor="White" HorizontalAlign="Center"></asp:TableHeaderCell>
                                    <asp:TableHeaderCell ID="hdrSource" Text="Source" ForeColor="White" HorizontalAlign="Center"></asp:TableHeaderCell>
                                    <asp:TableHeaderCell ID="hdrDescription" Text="Description" ForeColor="White" HorizontalAlign="Center"></asp:TableHeaderCell>
                                </asp:TableHeaderRow>
                                <asp:TableRow>
                                </asp:TableRow>
                            </asp:Table>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <p>
                            <!-- AddThis Button BEGIN -->

                            <script type="text/javascript">
                                var addthis_pub = "49f06d173d6ae88e";</script>

                            <a href="http://www.addthis.com/bookmark.php?v=20" onclick="return addthis_sendto()"
                                onmouseout="addthis_close()" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')">
                                <%-- Section 508 - Added alternate and descriptive text for image--%><img alt="On click of Bookmark and Share, will open new window for saving this web page as a bookmark"
                                    height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0"
                                    width="125" longdesc="desc/Bookmark.txt" /></a><script src="http://s7.addthis.com/js/200/addthis_widget.js"
                                        type="text/javascript">
                                    </script>

                            <!-- AddThis Button END -->
                        </p>
                    </td>
                    <td valign="top">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="containerDropdown" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="updateProgress" runat="server" EnableViewState="False">
        <ProgressTemplate>
            <asp:Panel ID="Panel1" runat="server">
                <div class="loading">
                </div>
                <div class="loader">
                    <%-- Section 508 - Added alternate and descriptive text for image--%><img alt="loading..."
                        src="images/loading2.gif" longdesc="desc/Load.txt" />
                </div>
            </asp:Panel>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <div id="disclaimerPopup" title="LEGAL DISCLAIMER" class="filterdialog" style="visibility: hidden;">
        <asp:UpdatePanel ID="legalDisclaimerUpdatePanel" runat="server" EnableViewState="false">
            <ContentTemplate>
                <p id="legalDisclaimer" runat="server">
                </p>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="containerDropdown" EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
